<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
				xmlns:ui="http://java.sun.com/jsf/facelets"
				xmlns:h="http://java.sun.com/jsf/html"
				xmlns:f="http://java.sun.com/jsf/core"
				xmlns:s="http://jboss.com/products/seam/taglib"
				xmlns:rich="http://richfaces.org/rich"
				template="../template.xhtml">

	<!-- content -->
	<ui:define name="content">
	<script>
	window.onload = function() {
		$('createSupermercado:nome').focus();

	}
	</script>
		<h:form id="createSupermercado">
		<h:messages styleClass="message" id="globalMessages" />
		<rich:panel>
			<f:facet name="header">Supermercado</f:facet>
			<s:validateAll>
	        <h:panelGrid columns="1">
	            <h:outputText value="Nome:"/>
	            <h:inputText id="nome" required="true" size="40" 
	            	value="#{supermercadoBean.supermercado.descricao}" />
	        </h:panelGrid>
	        </s:validateAll>
		</rich:panel>
		<br />
		<div class="actionButtons">
			<h:commandButton id="novo" value="Criar"
				action="#{supermercadoBean.create}" />
			<h:commandButton id="cancelar" value="Cancelar" action="ok" immediate="true" />
		</div>
		</h:form>
	</ui:define>
</ui:composition>
